<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('goods', function (Blueprint $table) {
            $table -> increments('gid');
            $table -> integer('pid') ;
            $table -> string('gname');
            $table -> string('gpirce') ;
            $table -> string('gnum');
            $table -> string('gscl');
            $table -> smallInteger('gstatus') -> comment('0下架, 1上架');
            $table -> string('gdesc');
            $table -> string('gpic');
            $table -> timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
         Schema::drop('goods');
    }
}
